import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../components/Home.vue'
import Shop from '../components/Shop.vue'
import Serch from '../components/Serch.vue'
import Rexiao from '../components/lb/rexiao.vue'
import Zhucai from '../components/lb/zhucai.vue'
import Liangcai from '../components/lb/liangcai.vue'
import Jiu from '../components/lb/jiu.vue'
import Chaofan from '../components/lb/chaofan.vue'
import Xiaochi from '../components/lb/xiaochi.vue'
import Yinliao from '../components/lb/yinliao.vue'

import '@/assets/css/global.css' // 导入全局样式

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    redirect: '/lb_zc',
    component: Home,
    children: [
      { path: '/sousuo', component: Serch },
      { path: '/rexiao', component: Rexiao },
      { path: '/lb_zc', component: Zhucai },
      { path: '/lb_lc', component: Liangcai },
      { path: '/lb_cf', component: Chaofan },
      { path: '/lb_xc', component: Xiaochi },
      { path: '/lb_yl', component: Yinliao },
      { path: '/lb_jiu', component: Jiu }
    ]
  },
  {
    path: '/shop',
    name: 'Shop',
    component: Shop
  }
]

const router = new VueRouter({
  routes
})

export default router
